package com.ruoyi.back.service

import com.ruoyi.app.common.Data
import com.ruoyi.app.common.PageData
import com.ruoyi.back.domain.dto.BackUserDto
import com.ruoyi.back.domain.vo.BackUserVo
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty

@ApiModel("更新密码得参数")
data class UpdatePasswordDto(
    @ApiModelProperty("旧密码") var oldPassword: String? = null,
    @ApiModelProperty("新密码") var newPassword: String? = null
)

interface BackUserService {

    /**
     * 保存或者编辑用户
     */
    fun saveBackUser(backUserDto: BackUserDto): Data<Boolean>

    /**
     * 获取用户列表
     */
    fun backUserPage(searchParam: String?): PageData<BackUserVo>

    /**
     * 更新后台用户密码
     */
    fun updateBackUserPassword(updatePasswordDto: UpdatePasswordDto): Data<Boolean>

    /**
     * 批量移除用户
     */
    fun removeUser(userIds: String): Data<Boolean>
}